package view.swing.popup;

import java.awt.Component;

import javax.swing.JOptionPane;

import util.Resources;

public class ErrorMessage extends AbstractMessage {

    private Component parentWindow;
    
	public ErrorMessage(String message) {
		this(Resources.getString("Error.ErrorOccured"), message);
	}

	public ErrorMessage(String title, String message) {
		super(title, message);
	}

	@Override
	public void show() {
		JOptionPane.showMessageDialog(parentWindow, message, title,
				JOptionPane.WARNING_MESSAGE);
	}

    public void setParentWindow(Component mainWindow) {
        this.parentWindow = mainWindow;
    }

}
